/*队列*/
struct Queue<T> {
    data: Vec<T>,
}
impl <T>Queue<T> {
    fn new() -> Queue<T> {
        Queue {
            data: Vec::new()
        }
    }

    fn push(&mut self, e: T) {
        self.data.push(e);
    }

    fn pop(&mut self) -> Option<T> {
        self.data.pop()
    }
}

pub fn queue_demo(){
    let mut q: Queue<String> = Queue::new();
    q.push(String::from("hello"));
    q.push(String::from("world"));
    for i in 0..3 {
        let o = q.pop();
        match o {
            Some(s) => println!("{}", s),
            None => println!("None"),
        }
    }
}